Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix None position values in publishDiagnostics message #753

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

rchl
Copy link
Contributor

@rchl rchl commented Sep 12, 2019

For some issues eslint triggers error with no endLine and/or
endColumn defined. In that case the code should use line and
column for the values, respectively. While the code has attempted to
do that, it only checked for null value for those while eslint
actually doesn't even have them set so they are undefined.

Fix by checking that value is either null or undefined.

This problem causes random exceptions on some LSP clients (for me it
triggered in Sublime LSP). Not sure if it affected Vetur.

Resolves #752

For some issues eslint triggers error with no `endLine` and/or
`endColumn` defined. In that case the code should use `line` and
`column` for the values, respectively. While the code has attempted to
do that, it only checked for `null` value for those while eslint
actually doesn't even have them set so they are undefined.

Fix by checking that value is either null or undefined.

This problem causes random exceptions on some LSP clients (for me it
triggered in Sublime LSP). Not sure if it affected Vetur.

Resolves microsoft#752
@dbaeumer
Copy link
Member

Thanks!

@dbaeumer dbaeumer merged commit 3ea0bb0 into microsoft:master Sep 17, 2019
@rchl rchl deleted the fix/none-line-and-character branch September 17, 2019 10:08
@dbaeumer dbaeumer added this to the 1.9.2 milestone Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

language server sends invalid position sometimes in publishDiagnostics
2 participants